<%@ page language="Java" import="java.util.*,descriptor.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%
	
	StudentListDescriptor listStudent = (StudentListDescriptor)request.getAttribute("listStudents");
	AcademicSupDescriptor academicSup = (AcademicSupDescriptor)request.getAttribute("academicSup");
	if(academicSup == null){
		response.sendRedirect("index.jsp");
	}
%>
<html>
	<jsp:include page="academicSupervisorHeader.jsp" >
		<jsp:param name="pageTitle" value="Work Placement Management System - Academic Supervisor" />
	</jsp:include>
	<body OnLoad="showmenu(document.getElementById('smenu2'));">
		<jsp:include page="academicSupervisorPageHeader.jsp"></jsp:include>
		<div id="container">
			<jsp:include page="academicSupMenu.jsp" ></jsp:include>
			<div id="content">
			<h3 class="posttitle">You have <%=listStudent.getStudentList().size()%> student(s) affiliated </h3>
				<div class="entry">
			
<table cellpadding="0" cellspacing="10" border="0">
<%
for(StudentDescriptor student : listStudent.getStudentList()){
%>
<tr>
<td><%=student.getFirstName()%> <%= student.getSurName()%></td>
<td><a href="AcademicSupServlet?page=academicSupervisorViewStudentDiary&amp;userId=<%=student.getId()%>">View Diary </a></td>
<%
 if(student.getCompanySupFeedback() != -1){
%>
<td><a href="AcademicSupServlet?page=academicSupervisorViewFeedback&amp;userId=<%=student.getId()%>">View Company Supervisor FeedBack </a> </td>
<% 
 }else{
 %>
 <td> No Company Feedback available </td>
<% 
 }
%>
<td><a href="AcademicSupServlet?page=academicSupervisorEditReport&amp;userId=<%=student.getId()%>">Edit report on this student </a> </td>

</tr>

<%
}
%>
</table>

				</div>
	    	</div>
			<jsp:include page="academicSupervisorPageFooter.jsp"></jsp:include>
		</div>
	</body>
</html>